package com.nowcoder.community.z_util.mhtest_kafka;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>——————————————————————————————————————————————-————
 * <p>   【名字】cookie工具类 【所属包】com.nowcoder.community.t
 * <p>
 * <p>   【谁调用我】登票拦截器
 * <p>
 * <p>   【调用我干什么】
 * <p>——————————————————————————————————————————————-————
 */
@Controller
public class Kafaconrol {

    @Autowired
    private KafkaProducer kafkaProducer;

    @RequestMapping("/k")
    @ResponseBody
    public String testKafka() {
        kafkaProducer.sendMessage("test", "你好");
        kafkaProducer.sendMessage("test", "在吗");

        return "ok";

    }


}
